package com.example.makerspace.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.makerspace.domain.DemandDO;
import com.example.makerspace.domain.TaskOutcomeScoreDO;
import com.example.makerspace.mapper.TaskFinishMapper;
import com.example.makerspace.mapper.TaskOutcomeScoreMapper;
import com.example.makerspace.vo.TaskOutComeScoreVO;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.List;

@Component
public class TaskOutcomeScoreDAO extends  BaseDAO<TaskOutcomeScoreDO> {
    @Resource
    private TaskOutcomeScoreMapper taskOutcomeScoreMapper;


    @PostConstruct
    public void init(){
        this.mapper = taskOutcomeScoreMapper;
    }
    public Page<TaskOutComeScoreVO> selectByTaskIdAndOutComeScore(Page<TaskOutComeScoreVO> page, Integer taskId, Integer outcomeId, String username) {
        return page.setRecords(taskOutcomeScoreMapper.getTaskOutcomeScoreByCondition(page,taskId,outcomeId,username));
    }
}
